<template>
	<div>
		<div class="pl-6 pr-6 pt-6">
			<el-card class="!border-none p-4" shadow="never">
			    <div class="flex justify-between">
					<div class="font-bold main-color text-2xl mb-5">
						产品信息
					</div>
			        <el-button type="primary" >
						<router-link
						    :to="{
						        path: getRoutePath(radio1== 1 ? 'enquiry.enquiry/goods' : 'enquiry.enquiry/message')
						    }"
						>
						   添加产品
						</router-link>
			        </el-button>
				</div>	
				<el-table class="mt-[20px]" size="large" :data="pager.lists" v-loading="pager.loading"
				:header-cell-style="{'background':'#0054A6','color':'#FFB400','line-height':'52px','padding':'14px 0'}"
				:cell-style="{'color':'#0054A6','padding':'20px 0'}"
				>
					<el-table-column label="产品图片" prop="scene_name" align="center" width="150">
						<el-avatar shape="square" :size="50" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png" />
					</el-table-column>
					<el-table-column label="产品名称" prop="type_desc" align="center" />
					<el-table-column label="产品型号" prop="scene_name" align="center" />
					<el-table-column label="需求数量" prop="scene_name" align="center">
						<template #default="{ row }">
							1
						</template>	
					</el-table-column>
					<el-table-column label="操作" fixed="right" align="center" >
						<template #default="{ row }">
							<el-button
							type="primary" 
							link
							>
								<router-link
									:to="{
										path: getRoutePath('enquiry.enquiry/viewPrice'),
										query: {
											id: 1
										}
									}"
								>
								   <span class="main-color1">查看报价</span>
								</router-link>
							</el-button>
						</template>
					</el-table-column>
				</el-table>
			</el-card>
		</div>	
	</div>
</template>

<script lang="ts" setup>
	import { computed, onMounted, reactive, ref, shallowRef } from 'vue'
	import { getRoutePath } from '@/router'
	import { noticeLists } from '@/api/message'
	import { usePaging } from '@/hooks/usePaging'
	
	// 列表数据
	
	const { pager, getLists } = usePaging({
	    fetchFun: noticeLists,
	})
	const handleDelete = async (id: number) => {
	    await feedback.confirm('确定要删除？')
	    // await menuDelete({ id })
	    getLists()
	}
	onActivated(() => {
	    getLists()
	})
	
	getLists()
</script>

<style lang="scss" scoped>
	.el-set-form:deep() .el-form-item__label{
		color: var(--el-text-color-main);
		height: 36px;
		line-height: 36px;
	}
	.el-set-form:deep() .el-input__inner{
		height: 36px;
	}
	.el-set-form:deep() .el-input__inner::placeholder {
		color: var(--el-text-color-main);
	}
</style>